<!DOCTYPE html>
<html>
<head>
    <title></title>
		<#include "/header.html">
    <style>
        .el-input-number .el-input__inner{text-align: left}
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">

            <div class="form-group col-sm-2">
                <el-input v-model="q.etlSystem" size="small" @keyup.enter="query(true)" placeholder="作业系统名称"></el-input>
            </div>
            <a class="btn btn-default btn-sm" @click="query"><i class="fa fa-search"></i> 查询</a>
            <a class="btn btn-primary btn-sm" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            <a class="btn btn-primary btn-sm" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            <a class="btn btn-primary btn-sm" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
        </div>
        <div style="padding: 0 10px">
            <el-table
                    :data="dataPage.list"
                    border
                    size="small"
                    height="452"
                    :stripe="true"
                    style="width: 100%"
                    @selection-change="handleSelectionChange">
                <el-table-column
                        type="selection"
                        width="50">
                </el-table-column>
                <el-table-column
                        label="序号"
                        :formatter="colIndex"
                        width="50"
                        align="center">
                </el-table-column>
<!--                <el-table-column-->
<!--                        prop="id"-->
<!--                        label="作业系统ID"-->
<!--                        :show-overflow-tooltip="true"-->
<!--                        align="center">-->
<!--                </el-table-column>-->
                <el-table-column
                        prop="etlSystem"
                        label="作业系统名称"
                        :show-overflow-tooltip="true"
                        align="center">
                </el-table-column>
                <el-table-column
                        prop="description"
                        label="作业系统描述"
                        :show-overflow-tooltip="true"
                        align="center">
                </el-table-column>
                <el-table-column
                        prop="logkeepperiod"
                        label="日志保存周期"
                        :show-overflow-tooltip="true"
                        align="center">
                </el-table-column>
                <el-table-column
                        prop="priority"
                        label="优先级"
                        :show-overflow-tooltip="true"
                        align="center">
                </el-table-column>
                <el-table-column
                        prop="concurrent"
                        label="并发数"
                        :show-overflow-tooltip="true"
                        align="center">
                </el-table-column>
            </el-table>
            <el-pagination
                    @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
                    :current-page="dataPage.currPage"
                    :page-size="dataPage.pageSize"
                    :page-sizes="[10, 20, 30]"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="dataPage.totalCount">
            </el-pagination>
        </div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">

                    <div class="form-group">
                        <div class="col-sm-2 control-label"><span style="color:red;margin-right: 4px">*</span>作业系统名称</div>
                        <div class="col-sm-10">
                            <el-input v-model="sys.etlSystem" size="small" placeholder="作业系统名称（要求大写且3个字符）" :maxlength="3"></el-input>
                        </div>
                    </div>

					          <div class="form-group">
                        <div class="col-sm-2 control-label">作业系统描述</div>
                        <div class="col-sm-10">
                            <el-input v-model="sys.description" size="small" placeholder="作业系统描述"></el-input>
                        </div>
                    </div>
											                    <div class="form-group" style="display:none">
                        <div class="col-sm-2 control-label">数据保存周期</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="sys.datakeepperiod" placeholder="10" value="10" readonly />
                          <span style="color:#FF0000">请输入数字</span>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">日志保存周期</div>
                        <div class="col-sm-10">
                            <el-input-number v-model="sys.logkeepperiod" style="width: 100%" size="small" placeholder="日志保存周期，只能输入数字" :controls="false"></el-input-number>
                        </div>
                    </div>
											                    <div class="form-group" style="display:none">
                        <div class="col-sm-2 control-label">记录保存周期</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="sys.recordkeepperiod" placeholder="10" value="10" readonly />
                            <span style="color:#FF0000">只能输入数字</span>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">优先级</div>
                        <div class="col-sm-10">
                            <el-input-number v-model="sys.priority" style="width: 100%" size="small" placeholder="优先级，只能输入数字" :controls="false"></el-input-number>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">并发数</div>
                        <div class="col-sm-10">
                            <el-input-number v-model="sys.concurrent" style="width: 100%" size="small" placeholder="并发数，只能输入数字" :controls="false"></el-input-number>
                        </div>
                    </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reBack" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/etl/sys.js?_${.now?long}"></script>
</body>
</html>
